from django.conf.urls.defaults import *
from kinidj import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from core.views import index
from kini.views import *

urlpatterns = patterns('',
    (r'^$', index ),
    (r'^quiniela/(?P<jornada_id>\d{2})/$', quiniela),
    (r'^quiniela/$', quiniela),
    
    (r'^jornada/(?P<jornada_id>\d{1})/$', jornada),
    (r'^jornada/(?P<jornada_id>\d{2})/$', jornada),
    (r'^jornada/$', jornada),
    (r'^temporada/(?P<fecha_ini>\d{4})/jornada/(?P<jornada_id>\d{1})/$', jornada),
    (r'^temporada/(?P<fecha_ini>\d{4})/jornada/(?P<jornada_id>\d{2})/$', jornada),

    (r'^temporada/(?P<fecha_ini>\d{4})/$', temporada),
    (r'^temporada/$', temporada),
    
    (r'^quiniela/add/$', quiniela_edit),
    (r'^quiniela/edit/(?P<jornada_id>\d{2})/$', quiniela_edit),

    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
    (r'^templates/css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.TEMPLATE_DIR + 'css/'}),
    (r'^templates/img/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.TEMPLATE_DIR + 'img/'}),
    
    (r'^admin/', include(admin.site.urls)),
)
